import re
inputs = ['18:29', '23:55', '123', 'ab:de', '18:299', '99:99']
#用lambda定义checker函数，找出所有符合24小时制规范的时间字符串
checker = lambda x: re.fullmatch('([01][0-9]|2[0-3]):[0-5][0-9]', x) != None

def test_inputok():
    assert [checker(x) for x in inputs] == [True, True, False, False, True, False]
